package com.yuan.springcloud.service;

import com.yuan.springcloud.dao.DeptDao;
import com.yuan.springcloud.entities.Dept;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: jinshengyuan
 * Date: 2019-03-22
 * Time: 14:34
 * description:
 **/
@Service
public class DeptService {
    @Autowired
    private DeptDao deptDao;

    public boolean add(Dept dept){
        return deptDao.addDept(dept);
    }

    public Dept getDeptById(Long id){
        return deptDao.getDeptById(id);
    }


    public List<Dept> getAll(){
        return deptDao.getAll();
    }
}
